package GUI;

import FilesManagers.CantOpenFileException;

public class ThreadCrearFirmas extends AbstractThreadManager {

	private String bits;
	private String cantHash;
	
	
	public ThreadCrearFirmas(String bits, String cantHash) {
		super();
		this.bits=bits;
		this.cantHash=cantHash;

	}
	
	@Override
	public void run() {
		CrearSignatureFile(bits,cantHash);

	}

	
	public void CrearSignatureFile(String bits, String cantHash){
		
		try {
			System.out.println("Start: " +cronometro.iniciar());
			signatureManager.makeNewSignature(signatureFile,Integer.valueOf(bits),Integer.valueOf(cantHash));
			
			System.out.println("End: " +cronometro.finalizar());
			System.out.println("Time: " +cronometro.duracion());
		} catch (NumberFormatException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (CantOpenFileException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
